--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit e5da3220f2aff8f744dccb7290615d093a23fab1
Parents : c334a8d
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-07-20T16:11:00+02:00
Display blocked connection map entries
Changes
4 files changed, 16 insertions(+), 5 deletions(-)
Diff
diff --git a/sbapp/main.py b/sbapp/main.py
index f09c8db9..82b28e75 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -5169,6 +5169,7 @@ class SidebandApp(MDApp):
elif iface_type == "TCPServerInterface": return "lan-connect"
elif iface_type == "I2PInterface": return "lock-pattern"
elif iface_type == "connection": return "transit-connection-variant"
+ elif iface_type == "blocked": return "close-octagon"
elif iface_type.startswith("signal-"):
try: strength = int(iface_type.replace("signal-", ""))
except Exception as e: return "wifi-strength-off-outline"
@@ -5181,8 +5182,9 @@ class SidebandApp(MDApp):
return "lan-connect"
def iface_appearance(self, iface_type):
- f = 0.95 if iface_type == "connection" else 0.8
- a = 1.0 if iface_type == "connection" else 1.0
+ connection_types = ["connection", "blocked"]
+ if iface_type in connection_types or iface_type.startswith("signal-"): f = 0.95; a = 1.0
+ else: f = 0.8; a = 1.0
return [self.iface_icon(iface_type), [255/255, 253/255, 231/255, a], [75/255*f, 97/255*f, 108/255*f, a]]
### Object details screen
diff --git a/sbapp/mapview/clustered_marker_layer.py b/sbapp/mapview/clustered_marker_layer.py
index 164a5b37..6b8dbc19 100644
--- a/sbapp/mapview/clustered_marker_layer.py
+++ b/sbapp/mapview/clustered_marker_layer.py
@@ -32,6 +32,7 @@ Builder.load_string(
allow_stretch: True
MDTelemetryIconButton:
+ id: tlm_icon_button
app: root.app
pos: [root.pos[0], root.pos[1]+dp(16)] if not root.small else [root.pos[0]+dp(7.5), root.pos[1]+dp(11)]
icon: root.icon
@@ -496,6 +497,12 @@ class ClusterMapMarker(MapMarker):
class MDTelemetryIconButton(MDIconButton):
def on_release(self, *args):
+ try:
+ RNS.log(f"{self.children[0]}")
+ RNS.log(f"{self.children[0].padding}")
+ RNS.log(f"{self.children[0].children[0].padding}")
+
+ except Exception as e: RNS.log(f"error: {e}")
if self.inspectable: self.app.map_display_telemetry(self)
else: RNS.log(f"No inspectable data for {RNS.prettyhexrep(self.source_dest)}", RNS.LOG_DEBUG)
@@ -519,6 +526,8 @@ class TelemetryClusterMarker(CustomMapMarker):
else: self.source = join(dirname(__file__), "icons", "marker_dark.png")
super(TelemetryClusterMarker, self).__init__(**kwargs)
+ if self.small: self.ids.tlm_icon_button.children[0].padding = [0, 0, 0, dp(1)]
+ else: self.ids.tlm_icon_button.children[0].padding = [0, 0, 0, dp(2)]
self.texture_update()
class ClusteredMarkerLayer(MapLayer):
diff --git a/sbapp/mapview/source.py b/sbapp/mapview/source.py
index 71eac37c..536613c9 100644
--- a/sbapp/mapview/source.py
+++ b/sbapp/mapview/source.py
@@ -31,7 +31,6 @@ class MapSource:
"atlas": ("Atlas", 0, 0, 19, "https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}", "© Esri", 256),
"custom_1": ("Custom 1", 0, 0, 19, MapSource.custom_1_url, "Custom Map", 256),
}
- RNS.log(f"Providers\n{MapSource.providers}")
def __init__(self, name="Map", url="http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", cache_key=None,
min_zoom=0, max_zoom=19, tile_size=256, image_ext="png", attribution="© OpenStreetMap contributors",
diff --git a/sbapp/ui/map.py b/sbapp/ui/map.py
index 4bd623a8..117892f1 100644
--- a/sbapp/ui/map.py
+++ b/sbapp/ui/map.py
@@ -724,7 +724,9 @@ class Map():
if "latitude" in p and "longitude" in p and "altitude" in p:
self.connection_map_hashes[p_hash] = p
if not p_hash in self.clustered_markers:
- if "signal" in p and "q" in p["signal"] and p["signal"]["q"] != None:
+ if "type_label" in p and p["type_label"] == "blocked":
+ if_appearance = self.app.iface_appearance("blocked")
+ elif "signal" in p and "q" in p["signal"] and p["signal"]["q"] != None:
try: signal_q = int(p["signal"]["q"])
except Exception as e: signal_q = "invalid"
if_appearance = self.app.iface_appearance(f"signal-{signal_q}")
@@ -734,7 +736,6 @@ class Map():
if_appearance[2] = source_appearance[2]
plat = float(p["latitude"]); plon = float(p["longitude"]); palt = float(p["altitude"])
telemetry = {"location": {"latitude": plat, "longitude": plon, "altitude": palt, "last_update": time.time()}}
- # marker = self.create_clustered_marker(p_hash, telemetry, if_appearance, inspectable=False)
marker = self.create_clustered_marker(telemetry_source, telemetry, if_appearance, small=True)
marker.parent = telemetry_source
if marker != None:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────